<?php

namespace app\admin\model;

use think\Model;

class InventoryItemInfo extends Model {
    // 表名
    protected $name = 'inventory_item_info';

    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'datetime';
    protected $dateFormat = 'Y-m-d H:i:s';

    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    public function outWarehouseInfo(){
        return $this->hasOne('app\admin\model\out\inventory');
    }

    public function inWarehouseInfo(){
      return $this->hasOne('app\admin\model\in\inventory');
    }
}


